import Vue from 'vue'
import VueRouter from 'vue-router'
import Find from '@/views/Find'
import My from '@/views/My'
import Part from '@/views/Part'
import Music from '@/views/Music'
import is404 from '@/views/is404'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/find'
  },
  {
    path: '/find',
    name: 'Find',
    component: Find
  },
  {
    path: '/my',
    name: 'My',
    component: My
  },
  {
    path: '/part',
    name: 'Part',
    component: Part
  },
  {
    path: '/music/:id',
    name: 'Music',
    component: Music
  },
  {
    path: '*',
    component: is404
  }
]

const router = new VueRouter({
  routes
})

export default router
